package com.aspectj.aop.root;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

import com.aspectj.aop.aspects.EventTrackAspect;

/**
 * desc   : 模版
 * author : chendaning
 * date   : 6/11/21
 */
public class AndroidAOP {
    private static Context mContext;
    private static EventTrackAspect.OnEventTrackCallback mOnEventTrackCallback;
    private static boolean mDebug = false;
    public static void init(Application application) {
        AndroidAOP.mContext = application.getApplicationContext();
    }

    public static Context getmContext() {
        return mContext;
    }

    public static void goTargetActivity(Class clasz){
        mContext.startActivity(new Intent(mContext, clasz));
    }

    public static void setmOnEventTrackCallback(EventTrackAspect.OnEventTrackCallback mOnEventTrackCallback) {
        AndroidAOP.mOnEventTrackCallback = mOnEventTrackCallback;
    }

    public static EventTrackAspect.OnEventTrackCallback getmOnEventTrackCallback() {
        return mOnEventTrackCallback;
    }

    public static boolean ismDebug() {
        return mDebug;
    }

    public static void setmDebug(boolean mDebug) {
        AndroidAOP.mDebug = mDebug;
    }
}
